class _GameConfig {
    appName = 'qy-cocos';
    versionCode: number = 1;
    version: string = '1.0.0';
    envType: EnvType = EnvType.Release;
    reportApiKey: string = '';
    UIMaskPrefab = null;
    supportMail: string = 'triwingamecontact@gmail.com';
    termsOfUse: string = 'https://www.startnewgames.com/terms_of_service.html';
    privacyPolicy: string = 'https://www.startnewgames.com/privacy_policy.html';
    marginTop: number = 0;
    marginBottom: number = 0;
    userDataVersion: number = 1;
    backRestartTime: number = 5 * 60 * 1000;// 5分钟
    httpUrl = 'http://solitaire.test.woohooslots.com:8080/';
    // http://solitaire.and.51chivalry.com
    ossUrl = 'https://d1ox7sz49rwsv1.cloudfront.net/solitaire/';
    // ossUrl = 'http://192.168.110.72:3210/';
}

export function getOssUrl() {
    return GameConfig.ossUrl + (GameConfig.envType == EnvType.Test ? 'test/' : 'release/');
}

export enum EnvType {
    Test = 0,
    Release = 1,
}

export const GameConfig = new _GameConfig();

export const REPORT_API_KEY_TEST = 'bdf9f5edcaf5f6e3a624be54c7b630df';
export const REPORT_API_KEY_RELEASE = 'db126e58dbf0ac688b9a6713b95bd228';

//音效类型
export enum playAudioType {
    Play,   //背景音乐
    OneShotAduio, //音效
}

//HTTP消息ID
export enum HttpMsgID {
    login = 2,
    rankList = 6,
    addCrown = 7,
    rankAward = 8,
    payNotify = 9,
}

export enum LoginTypeID {
    Guest = 0,
    GOOGLE,
    FACEBOOK,
    APPLE,
    WECHAT,
}

// export const MASK_OPACITY = 0xCC;
// export const MASK_COLOR = new Color(0, 0, 0, MASK_OPACITY);

//UI界面配置
export enum UIID {
    UILoading,
    UIHall,
}

/** UI配置结构体 */
export interface IUiConf {
    bundle?: string;
    prefab: string;
}

export const UIConfig: { [key: number]: IUiConf } = {
    [UIID.UILoading]: { prefab: 'prefab/load/UILoading', bundle: 'res'},
    [UIID.UIHall]: { prefab: 'prefab/hall/UIHall', bundle: 'res'},
}

//声音资源配置
export const SoundUrl = {
    // 大厅bgm
    home_bgm1: "home_bgm1",
    // 战斗bgm
    battle_bgm1_cat: "battle_bgm1_cat",
    // 通用点击
    ui: "ui",
}